home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 3.iso / dist / fw_qt3.idb / usr / freeware / Qt / tutorial / t2 / main.cpp.z / main.cpp
C/C++ Source or Header  |  2002-04-08  |  556b  |  26 lines

  1. /****************************************************************
  2. **
  3. ** Qt tutorial 2
  4. **
  5. ****************************************************************/
  6.  
  7. #include <qapplication.h>
  8. #include <qpushbutton.h>
  9. #include <qfont.h>
  10.  
  11.  
  12. int main( int argc, char **argv )
  13. {
  14.     QApplication a( argc, argv );
  15.  
  16.     QPushButton quit( "Quit", 0 );
  17.     quit.resize( 75, 30 );
  18.     quit.setFont( QFont( "Times", 18, QFont::Bold ) );
  19.  
  20.     QObject::connect( &quit, SIGNAL(clicked()), &a, SLOT(quit()) );
  21.  
  22.     a.setMainWidget( &quit );
  23.     quit.show();
  24.     return a.exec();
  25. }
  26.